package com.zoho.daliansheng.controller;

import com.alibaba.fastjson.JSONObject;
import com.zoho.daliansheng.service.LoginService;
import com.zoho.daliansheng.utils.ResultUtil;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/login")
@CrossOrigin
public class LoginController {

    LoginService loginService;

    public LoginController(LoginService loginService) {
        this.loginService = loginService;
    }

    @PostMapping("/getToken")
    public ResultUtil<Object> login(@RequestBody JSONObject param) {
        return loginService.login(param);
    }


}
